/*
 * File:   Strategy.h
 * Author: root
 *
 * Created on November 16, 2008, 11:51 AM
 */

#include "GameState.h"
#include "Move.h"

#ifndef _STRATEGY_H
#define	_STRATEGY_H

#include "Query.h"
#include <string>

using namespace std;

class Strategy {

    string name;
    int numParameters;
    int weight;

public:

    /**
     * The certainty of making the optimum decision, with respect to the optimality 
     * criteria of the strategy and the information available to it.
     */
    virtual int getDecisionCertainty() = 0;
    
    virtual int getWeight() {
        return weight;
    }

    Strategy(int myWeight) : numParameters(0), weight(myWeight) {
    }
    
    Strategy(const string& myName, int myParameterSize) 
    : name(myName), numParameters(myParameterSize), weight(0)
    {
        
    }
    
    virtual Strategy* getActiveInstance(int inst_weight) = 0;

    string getName() { return name; }
    int getNumParameters() { return numParameters; }

    // The range fraction is a value between 1 and 100 that defines where in the strategy's parameter range, the value should be set.
    // For example, if the parameter range for a strategy is 1 to 10 and the range fraction is 30, the execution parameter should be 3.
    virtual void setExecutionParameter(int index, int rangeFraction) = 0;
    
    virtual void opponentMove(int, const Move&) = 0;
    
    virtual ~Strategy() {}

};

#endif	/* _STRATEGY_H */

